package com.goldenKey.common.pojo.enumeration;

/**
 * 图书借阅赔偿情况
 */
public enum CompensateStatusEnum {

    WITHOUT_COMPENSATION(1, "无需赔偿"),
    COMPENSATED(2, "已赔偿"),
    NOT_COMPENSATION(-1, "未赔偿");


    private Integer status;
    private String desc;

    CompensateStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static CompensateStatusEnum getByStatus(Integer status) {
        for(CompensateStatusEnum item : CompensateStatusEnum.values()) {
            if(item.getStatus().equals(status)) {
                return item;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return this.status;
    }
    public String getDesc() {
        return this.desc;
    }
}
